<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="css/gsManagement.css" />
</head>
<body>
	<div class="header clearfix">
		<div class="header_left">
			<span>大朴网商品后台管理</span>
		</div>
		<div class="header_right">
			欢迎，<span>admin</span>
			<a href="">退出</a>
		</div>
	</div>
	<div class="left_menu">
		<div class="left_menu_title">商品</div>
		<div class="left_menu_content">
			<a href="bsm_gsManServlet?action=findAll_gs">商品管理</a>
		</div>
		<div class="left_menu_content">
			<a href="">品类管理</a>
		</div>
		<div class="left_menu_title">订单</div>
		<div class="left_menu_content">
			<a href="">订单管理</a>
		</div>
	</div>
	<div class="right_content clearfix">
		<div style="width:100%">
			<div class="right_content_header clearfix">
				<div style="float:left">
					<span>商品管理</span>
				</div>
				<div style="float:right">
					<input type="button" value="＋添加商品" id="add_gs">
				</div>
			</div>
			<div style="margin-bottom:20px">
				<select class="right_content_control" id="search_type">
					<option value="id">按商品id查询</option>
					<option value="name">按商品名称查询</option>
				</select>
				<input id="keyword" class="right_content_control" type="text" placeholder="请输入关键字">
				<input class="right_content_control" type="button" value="查询" onclick="search_gsById()">
			</div>
			<div style="margin-bottom:20px;">
				<table class="right_content_table" cellspacing="0" cellpadding="0" border="1px solid #CDCDCD">
					<tr>
						<td width="70">id</td>
						<td width="700">商品名称</td>
						<td width="195">状态</td>
						<td width="195">操作</td>
					</tr>
					<c:forEach var="all_gs" items="${gsList}">
						<tr>
							<td>${all_gs.g_id}</td>
							<td>${all_gs.g_name}</td>
							<td>
								<span class="saleStatus">在售</span>
								<button class="soldOut">下架</button>
							</td>
							<td>
								<a href="bsm_gsManServlet?action=find_gsDetail&g_id=${all_gs.g_id}" class="check">查看</a>
								<a href="bsm_gsManServlet?action=find_gsDetail_toEdit&g_id=${all_gs.g_id}" class="edit">编辑</a>
							</td>
						</tr>
					</c:forEach>
				</table>
			</div>
		</div>
	</div>
	<script src="js/jquery-3.3.1.js"></script>
	<script type="text/javascript" src="js/gsManagement.js"></script>
</body>
</html>